/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.srp.srpviolation.Impl;

import java.util.Calendar;
import za.ac.cput.srp.srpviolation.Family;

/**
 *
 * @author given
 */
public class FamilyImpl implements Family{
    private String name;
    private int knownRelativesNum;
    private int yearEst;
    private int totalYrsEst;
    private int numOfChildren;
    
    @Override
    public void setFamilyName(String name) {
        this.name = name;
    }

    @Override
    public void setNumberOfKnownFamilyReletives(int num) {
        knownRelativesNum = num;
    }

    @Override
    public void setYearFamilyEstablished(int year) {
        yearEst = year;
    }

    public int getYearEst() {
        return yearEst;
    }    
    

    @Override
    public void calculateNumberOfyrsSinceEst() {
        Calendar cal = Calendar.getInstance();
        totalYrsEst = cal.get(Calendar.YEAR) -  getYearEst();
    }

    public int getTotalYrsEst() {
        return totalYrsEst;
    }

    @Override
    public void setNumberOfChildrenCurrentGeneration(int number) {
        numOfChildren = number;
    }

    public int getNumOfChildren() {
        return numOfChildren;
    }    
}